#####custom
prefix_xilinx=/usr/local/mscore_xilinx
include platform/xilinx_linux.mk
prefix_x8664=/usr/local/mscore
prefix_aarch64=/usr/local/mscore_aarch64
prefix_armv7l=/usr/local/mscore_armv7l
export PKG_CONFIG_PATH=${prefix_x8664}/lib/pkgconfig:${prefix_aarch64}/lib/pkgconfig:${prefix_armv7l}/lib/pkgconfig:${prefix_xilinx}/lib/pkgconfig:$PKG_CONFIG_PATH
#########
PROGRAM_NAME=libmsprotocol

OUT_LIB=out/lib
OUT_BIN=out/bin
OUT_INCLUDE=out/include/$(PROGRAM_NAME)

OUT_JNISRC=out/$(PROGRAM_NAME)jni_source
OUT_JNILIB=$(OUT_JNISRC)/lib
OUT_JNIINCLUDE=$(OUT_JNISRC)/include

CFLAGS_SHARE=-shared
C_SRC= \
	src/msprotocol.c \
	src/igmp.c \
	src/file.c \
	src/http.c \
	src/librtmp.c \
	src/msav.c \
	src/none.c \
	src/pipe.c \
	src/rtp.c \
	src/rtsp.c \
	src/tcp.c \
	src/tssl.c \
	src/raw.c \
	src/srt.c \
	src/udp.c \
	src/hls.c \
	src/websockect.c
	
all: x8664

test: x8664 aarch64 armv7l

include platform/x8664_linux.mk
include platform/aarch64_linux.mk
include platform/armv7l_linux.mk

clean:
	rm  out -fr
help:
	@echo "USAGE:make target"
	@echo "    x8664		Produce the ${PROGRAM_NAME}.so,and install it"
	@echo "    aarch64		Produce the ${PROGRAM_NAME}.so and install it on arm64 platform"
	@echo "    armv7l		Produce the ${PROGRAM_NAME}.so and install it on armv7l platform"
	@echo "    clean		Clear out"
	@echo "    sample     		Sample program with ${PROGRAM_NAME} api"
